import type { ProColumns } from '@ant-design/pro-components';
import { FILTER_FIELDTYPE } from './constants';
/** 运维服务端登录页 */
export const loginPath = '/user/login';
/** 商家服务端登录页 */
export const merchantLoginPath = '/merchant-user/login';
/** 运维服务端api链接前缀 */
export const operationApiPrefixPath = '/api/admin';
/** 商家服务端api链接前缀 */
export const merchantApiPrefixPath = '/api/merchantbackstage';
export const merchantRoutePath = '/merchant-manager/';

export const defaultParentID = '00000000-0000-0000-0000-000000000000';
/** admin用户id集合 */
export const adminUserIds = ['584c17df-ac2a-4c5b-8efa-2bdeaa451eb3'];
export const defaultPagination = {
  current: 1,
  pageSize: 10,
};
export const formatDate = 'YYYY-MM-DD HH:mm:ss';
// 默认表格请求参数
export const defaultListRequestParams: Requestor.ListRequestParams = {
  page: 1,
  limit: 10,
  filters: [],
  sort: 'desc',
  sortField: 'createTime',
};
export const tableColumnValueTypes: {
  [key in number]: ProColumns<any>['valueType'];
} = {
  [FILTER_FIELDTYPE.STRING]: 'text',
  [FILTER_FIELDTYPE.DATETIME]: 'dateRange',
  [FILTER_FIELDTYPE.INT]: 'digit',
  [FILTER_FIELDTYPE.SINGLEDATETIME]: 'date',
  [FILTER_FIELDTYPE.GUID]: 'text',
  [FILTER_FIELDTYPE.BOOLEAN]: 'radio',
  [FILTER_FIELDTYPE.ENUM]: 'select',
  [FILTER_FIELDTYPE.LONG]: 'digit',
};
